<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
</head>
<body>
    <script>
        function Person(){

        }
        var person = new Person()
        //console.log(person);// {__proto__:...}
        //console.log(Person.prototype);//{cons:'...,__proto__:'...'}
    </script>
    <script>
            Grand.prototype.lastName = 'li'
            function Grand(){

             }
             var grand = new Grand()

             Father.prototype = grand //////

            function Father(){
            this.name = 'jiajun'
            this.fortune = {
                card1: 'visa'
            }
            this.num = 100
            }
              var father = new Father()

              Son.prototype = father //////

            function Son(){
            this.hobbit = 'reading'
                 }
                  var son = new Son()
                //  console.log(son.hobbit);//reading
                //  console.log(son.name);//jiajun
                //  console.log(son.lastName); //li
                //  console.log(son.fortune);
                
                //son.name = 'jiajia'
                // son.fortune.card2 = 'master'//引用值修改是可以被修改的
                // console.log(son);
                // console.log(father);

                  son.num++
                  console.log(father.num);
                  console.log(son.num);
    </script>
</body>
</html>